<?php 
	$factory = Factories::Init();
	$db = $factory->databaseObject("select","stocks");
	$array= $db->extractFrontPageStocks();
	if (count($array)==0){
		echo " <h1> Добре дошли на зайта Ни.</h1>";
	} else {
		$flag=1;
		foreach ($array as $stock){
			if (strcmp($stock->getFrontPage(),"first")==0){
				require_once 'vw/userside/frontPageFirstStockView.php';
			} else {
				if ($flag % 2 == 0) {
					require_once 'vw/userside/frontPageRightStockView.php';
				} else {
					require_once 'vw/userside/frontPageLeftStockView.php';
				}
				 
				$flag++;
	 
			}
		
		}
	}
?>